/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

export function getObj(id) {
  return request({
    url: '/workflow/wfywmain/' + id,
    method: 'get'
  })
}
export function streamCy(id) {
  return request({
    url: '/workflow/wfywmain/streamCy/' + id,
    method: 'get'
  })
}

export function guidObj(guid) {
  return request({
    url: '/workflow/wfywmain/guid/' + guid,
    method: 'get'
  })
}

export function create(obj) {
  return request({
    url: '/workflow/wfywmain/create',
    method: 'post',
    data: obj
  })
}

export function nextExecute(obj) {
  return request({
    url: '/workflow/wfywmain/nextExecute',
    method: 'post',
    data: obj
  })
}

export function nextStream(id, streamTaskId) {
  return request({
    url: '/workflow/wfywmain/nextStream?id=' + id + '&streamTaskId=' + streamTaskId,
    method: 'get'
  })
}

export function baskStream(obj) {
  return request({
    url: '/workflow/wfywmain/baskStream',
    method: 'post',
    data: obj
  })
}

export function revoke(id, sm) {
  return request({
    url: '/workflow/wfywmain/revoke?id=' + id + '&sm=' + sm,
    method: 'get'
  })
}

export function putObj(obj) {
  return request({
    url: '/workflow/wfywmain',
    method: 'put',
    data: obj
  })
}
export function wddbpage(query) {
  return request({
    url: '/act/task/todo', 
    method: 'get',
    params: query
  })
}

//奖金待办
export function jjdb(query) {
  return request({
    url: '/act/task/todo4Jj', 
    method: 'get',
    params: query
  })
}

export function wdfqpage(query) {
  return request({
    url: '/workflow/wfywmain/wdfqpage',
    method: 'get',
    params: query
  })
}
export function wdjbpage(query) {
  return request({
    url: '/workflow/wfywmain/wdjbpage',
    method: 'get',
    params: query
  })
}


//通过taskId获取按钮
export function getJJTaskById(taskId) {
  return request({
    url: '/act/task/getJJTaskById/'+taskId,
    method: 'get',
  })
}

//通过taskId获取按钮
export function submitJJTask(obj) {
  return request({
    url: '/jiangjin/jiangjinfpjjfpdjb/submitJJTask',
    method: 'post',
    data:obj
  })
}


export function todoAndtodo4Jj(query) {
  return request({
    url: '/act/task/todoAndtodo4Jj', 
    method: 'get',
    params: query
  })
}


export function submitJJTaskList(obj) {
  return request({
    url: '/jiangjin/jiangjinfpjjfpdjb/submitJJTaskList',
    method: 'post',
    data:obj
  })
}